package com.huixue.cn.ztej.dao;

import java.util.List;
import java.util.Map;

import com.huixue.cn.ztej.bean.User;
import com.huixue.cn.ztej.utils.annotation.MyBatisRepository;

/**
 * 
 * @author Administrator
 */
@MyBatisRepository
public interface UserMapper {
	
	/**
	 * save sys_user_session
	 * 
	 * @param SysUserSession
	 * @return
	 */
	public void saveUser(User user);

	/**
	 * update sys_user_session
	 * 
	 * @param SysUserSession
	 * @return
	 */
	public void update(User user);

	/**
	 * query sys_user_session by primary key
	 * 
	 * @param
	 * @return SysUserSession
	 */
	public User findById(Integer id);
	
	/**
	 * query sys_user_session by login_account
	 * 
	 * @param
	 * @return SysUserSession
	 */
	public User findByLoginName(String loginName);
	/**
	 * 根据登录名查找所有状态类型的用户
	 * 
	 * @param
	 * @return SysUserSession
	 */
	public User findByUserName(String userName);
	/**
	 * delete sys_user_session by primary key
	 * 
	 * @param SysUserSession
	 * @return
	 */
	public void delete(int id);
	
	 /**
	  * 分页查询
	  * @param searchParams
	  * @return
	  */
	 public List<User> searchByPage(Map<String, Object> searchParams);
	 
	 /**
	  * 查询出所有的用户
	  * @param tenantId
	  * @return
	  */
	 public List<User> findAll();
	 
	 /**
	  * 查询用户OpenId
	  * @param openId
	  * @return
	  */
	 public User findByOpenId(String openId);
	 
	 
	 public List<User> findUserByParams(Map<String,Object> searchParams);
	 
	 public void deleteforuser(User user);
	 
	 public void updateByPrimaryKey(User user);
	 
	 public List<User> haveUserForList(List<User> items);
	 
	 public void batchInsertUser(List<User> items);

}
